/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Hua YY
 * Date: 2024 —03 —17
 * Time: 20:29
 */
import java.util.Date;
class Date1 {
    public int year;
    public int month;
    public int day;

    public static int time;
    /*public Date(int year ,int month , int day){
        this.year = year;
        this.month = month;
        this.day = day;

    }

    构造方法是成员方法中的一个分支*/
    public Date1(){
        this(1999,4,2);
        System.out.println(year +"/"+month +"/"+day);
        /*this.year = 2024;
        this.month = 3;
        this.day = 17;*/
    }
    public Date1(int year ,int month , int day){
        this.year = year;
        this.month = month;
        this.day = day;
    }
}
public class test1 {
    public static void main(String[] args) {
        Date1 date1 = new Date1();
        Date date = new Date();
        System.out.println(date.getTime());
        System.out.println("=====================");

        System.out.println("通过类名直接点出来静态成员变量"+":"+Date1.time);
        System.out.println("通过实例化出来的对象间接点出来静态成员变量"+":"+date1.time);
    }


}
